import Vue from 'vue'
import Router from 'vue-router'
import main from '@/components/main'
import regionList from '@/components/regionList'
import buy from '@/components/buy/buy'
import rent from '@/components/rent/rent'
import newDevelopment from '@/components/newDevelopment/newDevelopment'
import buyDetails from '@/components/buy/buyDetails'
import rentDetails from '@/components/rent/rentDetails'
import devDetails from '@/components/newDevelopment/devDetails'
import hostel from '@/components/hostel/hostel'
import hostelDetails from '@/components/hostel/hostelDetails'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'mainFul',
      component: main,
      redirect: '/main',
      children: [
        {path: '/main', component: main, name: 'main', hidden: true}
        ],
    },
    {
      path: '/regionList',
      name: 'regionList',
      component: regionList
    },
    {
      path: '/buy',
      name: 'buy',
      component: buy
    },
    {
      path: '/rent',
      name: 'rent',
      component: rent
    }, {
      path: '/newDevelopment',
      name: 'newDevelopment',
      component: newDevelopment
    },
    {
      path: '/buyDetails',
      name: 'buyDetails',
      component: buyDetails
    },
    {
      path: '/rentDetails',
      name: 'rentDetails',
      component: rentDetails
    },
    {
      path: '/devDetails',
      name: 'devDetails',
      component: devDetails
    },
    {
      path: '/hostel',
      name: 'hostel',
      component: hostel
    },
    {
      path: '/hostelDetails',
      name: 'hostelDetails',
      component: hostelDetails
    }
  ]
})
